<template class='body'>
  <van-row class="main-menu">
    <div class="waiquanbox">
    <!-- 底部导航栏 -->
    <div class="bottom">
     
      <div class="item"  :class="{active: $route.path==='/dealtwith/jumpye/companyunit'}">
        <i class="iconfont icon-shouye1"></i>
        <p>                
          <el-dropdown placement="top">
            <span><i class="el-icon-circle-plus-outline" style="color:#0895fd;"></i>新建</span>
            <el-dropdown-menu slot="dropdown">
              <router-link to="/execelIntroduce/gsintroduce/">
                <el-dropdown-item>
                  <span>公司新建</span>
                </el-dropdown-item>
              </router-link>
              <router-link to="/execelIntroduce/introduce/">
                <el-dropdown-item>
                  <span>单位新建</span>
                </el-dropdown-item>
              </router-link>
            </el-dropdown-menu>
          </el-dropdown>
          </p>
      </div>
       <div class="item">
        <p>                
          <el-dropdown placement="top">
            <span><i class="el-icon-circle-plus-outline" style="color:rgb(37, 208, 75);"></i>加分申请</span>
            <el-dropdown-menu slot="dropdown">
              <router-link :to="'/main/' + $vo.AssessType.CORP">
                <el-dropdown-item>
                  <span>公司加分申请</span>
                </el-dropdown-item>
              </router-link>
              <router-link :to="'/main/' + $vo.AssessType.DEPT">
                <el-dropdown-item>
                  <span>单位加分申请</span>
                </el-dropdown-item>
              </router-link>
            </el-dropdown-menu>
          </el-dropdown>
        </p>
      </div>
      <div class="item">
        <p>                
          <el-dropdown placement="top">
            <span><i class="el-icon-s-order" style="color:#e67a2b;"></i>考评查询</span>
            <el-dropdown-menu slot="dropdown">
              <router-link :to="'/dealtwith/scoreindex/' + $vo.AssessType.CORP ">
                <el-dropdown-item>
                  <span>公司考评</span>
                </el-dropdown-item>
              </router-link>
              <router-link :to="'/dealtwith/scoreindex/' + $vo.AssessType.DEPT ">
                <el-dropdown-item>
                  <span>单位考评</span>
                </el-dropdown-item>
              </router-link>
            </el-dropdown-menu>
          </el-dropdown>
        </p>
      </div>
       <div class="item" @click="clickItem('/dealtwith/category')" :class="{active: $route.path==='/dealtwith/category'}">
        <p>                
            <span><i class="el-icon-s-opportunity" style="color:red;"></i>问题查询</span>
        </p>
      </div>
      <div class="item" @click="clickItem('/Report/ReGsport')" :class="{active: $route.path==='/Report/ReGsport'}">
        <p>                
            <span><i class="el-icon-cpu" style="color:#c5a916;"></i>智能报告</span>
        </p>
      </div>
      <div v-if="this.$store.state.authInfo.user.rectify[0].department_path == '超高压输电公司/公司本部/安全监管部（应急指挥中心）' ? true : false" class="item"  :class="{active: $route.path==='/dealtwith/jumpye/companyunit'}">
        <i class="iconfont icon-shouye1"></i>
        <p>                
          <el-dropdown placement="top">
            <span><i class="el-icon-edit-outline" style="color:#ff00c6;"></i>过程考评(启动)</span>
            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item>
                <span @click="shoupinfen">公司考评(启动)</span>
              </el-dropdown-item>
              <el-dropdown-item>
                <span @click="shoupinfendw">单位自评(启动)</span>
              </el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
          </p>
      </div>
    </div>
    </div>
  </van-row>
</template>



<script>
/* 交互api */
import {
  openShouPinfendw,
  openShouPinfen,
} from "../../../api/dealtwith";
export default {
  data() {
    return {
      // department_path: "", //部门
    };
  },
  created() {
  
  },
  mounted(){
    // this.department_path = this.$store.state.authInfo.user.rectify[0]
    // console.log(this.department_path)
  },
  methods: {
       shoupinfen() {
      openShouPinfen() //请求临时列表数据
        .then((res) => {
          console.log(res);
          if (res.data.retCode == "200") {
            this.$message({
              type: "error",
              message: "公司评分手动开启失败，已有启动的公司评分批次",
            });
          }
          if (res.data.retCode == "400") {
            this.$message({
              type: "success",
              message: "公司评分手动开启成功",
            });
          }
        })
        .catch((err) => {
          console.log(err);
        });
    },
    shoupinfendw() {
      openShouPinfendw() //请求临时列表数据
        .then((res) => {
          console.log(res);
          if (res.data.retCode == "200") {
            this.$message({
              type: "error",
              message: "单位评分手动开启失败，已有启动的单位评分批次",
            });
          }
          if (res.data.retCode == "400") {
            this.$message({
              type: "success",
              message: "单位评分手动开启成功",
            });
          }
        })
        .catch((err) => {
          console.log(err);
        });
    },
    //底部导航栏
    clickItem:function(path){
      this.$router.push(path);
    },
   
  },
};
</script>

<style scoped lang="less">
*{
  margin: 0;
  padding: 0;
}
body {
  background: #ccc;
  box-sizing: border-box;
}
    //底部导航栏
  .bottom{
    position: fixed;
    bottom:0px;
    border-top:1px solid #d2d2d2;
    background-color: #f2f2f2;
    width: 100%;
    left: 0;
    display: flex;
  }
  .item{
    text-align: center;
    line-height: 25px;
    border-right: 1px solid #ccc;
    box-sizing:border-box;
    cursor: pointer;
    color: #606266;
    font-size: 14px;
    flex-grow: 1;
    background: white;
    transition: all .4s;
  }
  .item:hover{
    background: #e9e9e9;
  }
    .el-dropdown{
      display: block;
      width: 100%;
    }
.item span{ 
    display: block;
    width: 100%;
    height: 100%;
    padding: 5px 0;
    line-height: 30px;
    font-size: 16px;
  }
  .item span i { 
    margin-right: 3px;
  }
  .item:last-child{
    border-right: none;
  }
  .item p{
    width: 100%;
    text-align: center;
    display: inline-block;
    
  }
  .active{
    color:#108b70;
  } 
  /deep/.el-dropdown-menu .popper__arrow{
    display: none;
  }
  /deep/.el-dropdown-menu__item{
    padding: 0 5px!important;
  }
  /deep/.el-dropdown-menu__item a{
    color:#606266;
  }
  
  @media screen and (max-width: 768px) {
  .item span {
    font-size: 12px;
  }
}
</style>
